package com.open.center.common.databind.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import com.open.center.common.databind.ObjectDesensitizeSerializer;
import com.open.center.common.databind.desensitization.Desensitization;


/**
 * 数据脱敏注解
 *
 * @author Riche's
 * @since 2025/5/23
 */

@Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotationsInside
@JsonSerialize(using = ObjectDesensitizeSerializer.class)
@Documented
public @interface Desensitize {

    /**
     * 对象脱敏器
     */
    @SuppressWarnings("all")
    Class<? extends Desensitization<?>> desensitization();

}
